package com.kaibes.admin.theme;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.kaibes.module.theme.Theme;
import com.kaibes.module.theme.ThemeService;
import com.kaibes.web.admin.AdminController;
import com.kaibes.web.api.ApiLink;

@AdminController
@RequestMapping("/admin/theme/setting")
public class ThemeController {

    @Autowired
    private ThemeService themeService;

    @GetMapping
    @ApiLink("主题设置页面")
    public String themeSet(Model model, HttpServletRequest request) {
        List<Theme> themeList = themeService.list();
        model.addAttribute("themeList", themeList);
        return "theme-setting";
    }

}
